package com.sciencep.pro.core.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sciencep.pro.core.domain.dto.dropdown.ProSelectVO;
import com.sciencep.pro.core.domain.dto.home.*;
import com.sciencep.pro.core.domain.dto.project.PeopleWorkDayTO;
import com.sciencep.pro.core.domain.dto.project.ProAssignmentTO;
import com.sciencep.pro.core.domain.dto.project.ProNodeTO;
import com.sciencep.pro.core.domain.dto.project.ProjectTO;
import com.sciencep.pro.core.domain.entity.ProBaseInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sciencep.pro.core.domain.vo.workdailylog.ProjectProgressVo;
import com.sciencep.pro.core.domain.vo.workdailylog.UserDeptNamesVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Set;

/**
 * @author Sciencep
 */
public interface ProBaseInfoMapper extends BaseMapper<ProBaseInfo> {

    ProjectTO editProjectInit(@Param("proBaseInfo") ProBaseInfo proBaseInfo);

    ProjectTO getProjectSumPlanDay(@Param("proBaseInfo") ProBaseInfo proBaseInfo);

    ProjectTO getCurrentSumPlanDay(@Param("proBaseInfo") ProBaseInfo proBaseInfo);

    ProjectTO getCurrentSumPerformanceDaily(@Param("proBaseInfo") ProBaseInfo proBaseInfo);

    String getSumPerformanceDaily(@Param("proBaseInfo") ProBaseInfo proBaseInfo);

    ProjectTO getProjectSumRealityDay(@Param("proBaseInfo") ProBaseInfo proBaseInfo);

    BigDecimal getProgressByCode(@Param("projectTo") ProjectTO projectTo);

    List<ProNodeTO> proNodeListInfo(@Param("proBaseInfo") ProBaseInfo proBaseInfo);

    List<ProAssignmentTO> getProAssignmentList(@Param("proBaseInfo") ProBaseInfo proBaseInfo);

    List<ProSelectVO> getProjectsByUserIdWithPm(String userId);

    /**
     * 根据项目id，以每个人员为单位，统计累计投入的总和为总人天
     *
     * @return
     */
    List<PeopleWorkDayTO> getAssignmentDay(String proId);

    List<PeopleWorkDayTO> getFinishDay(String proNo);

    List<PeopleWorkDayTO> getPerformanceDailyDay(String proNo);

    List<PeopleWorkDayTO> getAssignmentDayRole(String proId);

    List<PeopleWorkDayTO> getFinishDayRole(String proNo);

    List<PeopleWorkDayTO> getPerformanceDailyDayRole(String proNo);

    Integer getDelayCount();

    List<ParticipatedInInfoVO> getParticipatedInInfoVO(@Param("userId") String userId, @Param("proCodeList") Set<String> proCodeList, @Param("isBoss") Integer isBoss);

    List<ManPowerExpendByProjectVO> getManPowerExpendByProjectVOList(@Param("proNos") Set<String> proNos);

    List<ManpowerExpendByRoleVO> getManpowerExpendByRoleVOList(@Param("proNos") Set<String> proNos);

    ManpowerExpendByRoleVO getManpowerExpendByOTHER();

    List<DailyReportReivewVO> getDailyReportReivewVOList();

    List<ManpowerUtilizationVO> getWorkPlan();

    List<ManpowerUtilizationVO> getWorkPutin();

    String getDept(String userId);

    Page<ParticipatedInInfoVO> getMyProject(String userId, Page<ParticipatedInInfoVO> page);

    List<UserDeptNamesVo> getUserDeptNames();

    Integer selectDelayProjects();


    List<ProjectProgressVo> selectProjectProgress();

}
